<?php

namespace App\Models;

use App\Enums\AuditStatus;
use BenSampo\Enum\Traits\CastsEnums;

/**
 * @mixin IdeHelperUserAuth
 */
class UserAuth extends BaseModel
{
    use CastsEnums;

    protected $casts = [
        'audit_status' => AuditStatus::class,
    ];

    public function user()
    {
        return $this->belongsTo(FrontendUser::class, 'user_id');
    }

    public function bank()
    {
        return $this->belongsTo(YeepayBank::class, 'bank_code', 'code');
    }
}
